<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>选择难度 - 连连看游戏系统</title>
    <link rel="stylesheet" th:href="@{/static/css/common.css}">
    <style>
        .difficulty-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 30px;
            margin-top: 40px;
        }
        
        .difficulty-card {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 40px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            border: 3px solid transparent;
            position: relative;
            overflow: hidden;
        }
        
        .difficulty-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s;
        }
        
        .difficulty-card:hover::before {
            left: 100%;
        }
        
        .difficulty-card:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
        }
        
        .difficulty-easy {
            border-color: #67c23a;
        }
        
        .difficulty-easy:hover {
            border-color: #67c23a;
            box-shadow: 0 15px 35px rgba(103, 194, 58, 0.3);
        }
        
        .difficulty-normal {
            border-color: #e6a23c;
        }
        
        .difficulty-normal:hover {
            border-color: #e6a23c;
            box-shadow: 0 15px 35px rgba(230, 162, 60, 0.3);
        }
        
        .difficulty-hard {
            border-color: #f56c6c;
        }
        
        .difficulty-hard:hover {
            border-color: #f56c6c;
            box-shadow: 0 15px 35px rgba(245, 108, 108, 0.3);
        }
        
        .difficulty-icon {
            font-size: 72px;
            margin-bottom: 20px;
            animation: bounce 2s ease-in-out infinite;
        }
        
        @keyframes bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        
        .difficulty-title {
            font-size: 28px;
            font-weight: bold;
            margin-bottom: 15px;
        }
        
        .difficulty-easy .difficulty-title {
            color: #67c23a;
        }
        
        .difficulty-normal .difficulty-title {
            color: #e6a23c;
        }
        
        .difficulty-hard .difficulty-title {
            color: #f56c6c;
        }
        
        .difficulty-desc {
            color: #666;
            font-size: 15px;
            line-height: 1.6;
            margin-bottom: 20px;
        }
        
        .difficulty-stats {
            background: #f5f7fa;
            border-radius: 10px;
            padding: 15px;
            margin-top: 20px;
        }
        
        .stat-row {
            display: flex;
            justify-content: space-between;
            margin: 8px 0;
            font-size: 14px;
        }
        
        .stat-label {
            color: #999;
        }
        
        .stat-value {
            color: #333;
            font-weight: 600;
        }
        
        .back-btn {
            margin-top: 30px;
        }
    </style>
</head>
<body>
    <div class="page-header">
        <h1>🎮 连连看游戏系统</h1>
        <p class="subtitle">选择你的挑战难度</p>
    </div>

    <div class="container">
        <div class="card" style="max-width: 1000px; margin: 0 auto;">
            <h2 class="card-title">单机模式 - 难度选择</h2>
            
            <div class="difficulty-grid">
                <!-- 简单难度 -->
                <div class="difficulty-card difficulty-easy" onclick="startGame('easy')">
                    <div class="difficulty-icon">😊</div>
                    <div class="difficulty-title">简单模式</div>
                    <div class="difficulty-desc">
                        适合新手玩家<br>
                        轻松上手，享受游戏乐趣
                    </div>
                    <div class="difficulty-stats">
                        <div class="stat-row">
                            <span class="stat-label">棋盘大小</span>
                            <span class="stat-value">6 x 8</span>
                        </div>
                        <div class="stat-row">
                            <span class="stat-label">对子数量</span>
                            <span class="stat-value">24 对</span>
                        </div>
                        <div class="stat-row">
                            <span class="stat-label">时间限制</span>
                            <span class="stat-value">无限制</span>
                        </div>
                        <div class="stat-row">
                            <span class="stat-label">基础得分</span>
                            <span class="stat-value">10 分/对</span>
                        </div>
                    </div>
                </div>
                
                <!-- 普通难度 -->
                <div class="difficulty-card difficulty-normal" onclick="startGame('normal')">
                    <div class="difficulty-icon">🎯</div>
                    <div class="difficulty-title">普通模式</div>
                    <div class="difficulty-desc">
                        标准游戏难度<br>
                        考验速度与技巧
                    </div>
                    <div class="difficulty-stats">
                        <div class="stat-row">
                            <span class="stat-label">棋盘大小</span>
                            <span class="stat-value">8 x 10</span>
                        </div>
                        <div class="stat-row">
                            <span class="stat-label">对子数量</span>
                            <span class="stat-value">40 对</span>
                        </div>
                        <div class="stat-row">
                            <span class="stat-label">时间限制</span>
                            <span class="stat-value">30 秒/步</span>
                        </div>
                        <div class="stat-row">
                            <span class="stat-label">基础得分</span>
                            <span class="stat-value">12 分/对</span>
                        </div>
                    </div>
                </div>
                
                <!-- 困难难度 -->
                <div class="difficulty-card difficulty-hard" onclick="startGame('hard')">
                    <div class="difficulty-icon">🔥</div>
                    <div class="difficulty-title">困难模式</div>
                    <div class="difficulty-desc">
                        极限挑战<br>
                        高手的试炼场
                    </div>
                    <div class="difficulty-stats">
                        <div class="stat-row">
                            <span class="stat-label">棋盘大小</span>
                            <span class="stat-value">10 x 12</span>
                        </div>
                        <div class="stat-row">
                            <span class="stat-label">对子数量</span>
                            <span class="stat-value">60 对</span>
                        </div>
                        <div class="stat-row">
                            <span class="stat-label">时间限制</span>
                            <span class="stat-value">20 秒/步</span>
                        </div>
                        <div class="stat-row">
                            <span class="stat-label">基础得分</span>
                            <span class="stat-value">15 分/对</span>
                        </div>
                    </div>
                </div>
            </div>
            
            <div class="text-center back-btn">
                <a th:href="@{/user/home}" class="btn btn-secondary">
                    ← 返回主页
                </a>
            </div>
        </div>
    </div>

    <footer class="page-footer">
        <p>&copy; 2024 连连看游戏系统. All rights reserved.</p>
        <p>让游戏更有趣，让生活更精彩</p>
    </footer>

    <script>
        function startGame(mode) {
            window.location.href = '/user/game/single?mode=' + mode;
        }
    </script>
</body>
</html>

